package com.itheima.health.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.health.pojo.CheckGroup;
import com.itheima.health.pojo.Setmeal;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SetmealMapper extends BaseMapper<Setmeal> {


    @Select("SELECT c.* from t_checkgroup c join t_setmeal_checkgroup sc on c.id=sc.checkgroup_id\n" +
            "join t_setmeal s on s.id=#{id} and s.id = sc.setmeal_id")
    List<CheckGroup> findById(Integer id);
}
